<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Trademark_printing')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-trademark_printing" readonly data-rule="required" class="form-control" name="row[trademark_printing]" type="text" value="{$row.trademark_printing|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Abbreviation')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-abbreviation" readonly class="form-control" name="row[abbreviation]" type="text" value="{$row.abbreviation|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Colour_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input disabled id="c-colour_id" data-rule="required" readonly data-source="other/colour/index" class="form-control selectpage" name="row[colour_id]" type="text" value="{$row.colour_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Finished_weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-finished_weight" min="0" class="form-control" step="0.01" name="row[finished_weight]" type="number" value="{$row.finished_weight|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Feeding_weight')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-feeding_weight" class="form-control" step="0.01" name="row[feeding_weight]" type="number" value="{$row.feeding_weight|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Attribute')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-attribute" class="form-control selectpicker" name="row[attribute]">
                {foreach name="attributeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.attribute"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('长档比例')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input value="{$row.long_ratio}" id="c-long_ratio" class="form-control" name="row[long_ratio]" type="number" step="0.01" data-rule="required">
        </div>
    </div>
    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('长档详情')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="basictpl" data-name="row[longlist]" id="j-longlist">
                <dd>
                    <ins>{:__('原料名')}</ins>
                    <ins>{:__('原料色号')}</ins>
                    <ins>{:__('比例')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[longlist]" class="form-control hidden" cols="30" rows="5">{$row.longlist}</textarea>
            </dl>
            <script id="basictpl" type="text/html">
                <dd class="form-inline">
                    <ins><input data-source="statistics/materialplan/getMaterialName"  type="text" data-rule="required"  name="<%=name%>[<%=index%>][material]" class="form-control selectpage" value="<%=row.material%>" placeholder="原料色号"/></ins>
                    <ins><input data-source="statistics/materialplan/getMaterialColourName"  type="text" data-rule="required"  name="<%=name%>[<%=index%>][material_colour]" class="form-control selectpage" value="<%=row.material_colour%>" placeholder="原料色号"/></ins>
                    <ins><input type="number" data-rule="required"  step="0.01" name="<%=name%>[<%=index%>][ratio]" class="form-control" value="<%=row.ratio%>" placeholder="比例"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('短档比例')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-short_ratio"  type="number" step="0.01" value="{$row.short_ratio}"   class="form-control" name="row[short_ratio]" type="text" >
        </div>
    </div>
    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('短档详情')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="basictpl" data-name="row[shortlist]" id="j-shortlist">
                <dd>
                    <ins>{:__('原料名')}</ins>
                    <ins>{:__('原料色号')}</ins>
                    <ins>{:__('比例')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                <textarea name="row[shortlist]" class="form-control hidden" cols="30" rows="5">{$row.shortlist}</textarea>
            </dl>
            <script id="shortlisttpl" type="text/html">
                <dd class="form-inline">
                    <ins><input data-source="statistics/materialplan/getMaterialName"  type="text" data-rule="required"  name="<%=name%>[<%=index%>][material]" class="form-control selectpage" value="<%=row.material%>" placeholder="原料色号"/></ins>
                    <ins><input data-source="statistics/materialplan/getMaterialColourName"  type="text" data-rule="required"  name="<%=name%>[<%=index%>][material_colour]" class="form-control selectpage" value="<%=row.material_colour%>" placeholder="原料色号"/></ins>
                    <ins><input type="number" data-rule="required"  step="0.01" name="<%=name%>[<%=index%>][ratio]" class="form-control" value="<%=row.ratio%>" placeholder="比例"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            -->
<!--            <div class="radio">-->
<!--            {foreach name="statusList" item="vo"}-->
<!--            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> -->
<!--            {/foreach}-->
<!--            </div>-->

<!--        </div>-->
<!--    </div>-->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
